package com.lnsf.bookstore.system.role.service;

import com.github.pagehelper.PageInfo;
import com.lnsf.bookstore.system.role.vo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface RoleService {

    PageInfo<Role> selectAll(Map<String, Object> map, Role role);

    Role selectById(Integer roleId);

    /**
     * 根据用户Id和角色名称统计
     * @param userId
     * @param name
     * @return
     */
    long countByUserIdAndName(@Param("userId") Integer userId, @Param("name") String name);

    int save(Role role);

    int update(Role role);

    int delete(Integer roleId);

    List<Role> selectLevel();

    void deleteBatch(Integer[] roleIds);
}
